package com.quantdo.qtm.linux.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.quantdo.qtm.interfaces.linux.pojo.monitor.query.LinuxStatusPointQuery;
import com.quantdo.qtm.linux.pojo.model.LinuxStatusPointDo;

@Mapper
public interface LinuxStatusPoint {

    @Insert("insert into linux_status_point(curr_time,linux_server,cpu_used_rate,monery_used_rate,swap_used_rate,disk_used_rate,disk_path)"
            + "values(#{currTime},#{linuxServer},#{cpuUsedRate},#{moneryUsedRate},#{swapUsedRate},#{diskUsedRate},#{diskPath})")
    int insert(LinuxStatusPointDo linuxDo);

    @Select("select * from linux_status_point point where point.curr_time > #{beginTime}")
    List<LinuxStatusPointDo> select(LinuxStatusPointQuery query);
}
